package com.zhentao;

import com.zhentao.model.entity.user.UserInfo;

public class UserInfoThreadLocalUtil {

    private final static ThreadLocal<UserInfo> THREAD_LOCAL=new ThreadLocal<>();

    public static void setUser(UserInfo user){
        THREAD_LOCAL.set(user);
    }
    public static UserInfo getUser(){
        return THREAD_LOCAL.get();
    }
    public static void remove(){
        THREAD_LOCAL.remove();
    }
}
